package com.jhd.fuzhou.service;


import com.jhd.fuzhou.vo.JsonForResult;

import java.util.Map;

import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;

public interface ProcessService {
    //审批意见接口/通过流程实例id获取任务办理历史记录,传procInstId
    @GET("workflow/workflow/instance/history/list")
    Call<JsonForResult> list(@Header("Authorization") String token,@Header("username") String username, @QueryMap Map<String, String> params);
    //第一步，根据业务ID获取流程实例ID,传businessKey
    @GET("workflow/workflow/instance/getProInstanceId")
    Call<JsonForResult> getProInstanceId(@Header("Authorization") String token,@Header("username") String username, @QueryMap Map<String, String> params);
    //第二步，提交申请，启动流程实例
    @POST("workflow/workflow/instance/start")
    Call<JsonForResult> start(@Header("Authorization") String token,@Header("username") String username, @Body RequestBody requestBody);
    //第三步，完成任务
    @POST("workflow/workflow/task/completeByAssign")
    Call<JsonForResult> completeByAssign(@Header("Authorization") String token,@Header("username") String username, @Body RequestBody requestBody);
    @POST("workflow/workflow/task/back")
    Call<JsonForResult> back(@Header("Authorization") String token,@Header("username") String username, @QueryMap Map<String, String> params);
//    Call<JsonForResult> back(@Header("Authorization") String token,@Header("username") String username, @Body RequestBody requestBody);
    //第三步，完成任务
    @GET("workflow/workflow/task/back/nodes")
    Call<JsonForResult> backNodes(@Header("Authorization") String token,@Header("username") String username, @QueryMap Map<String, String> params);
    //通过主键id修改相关字段
    @POST("supervise/supervisionInspection/updateSuperviseInspectionById")
    Call<JsonForResult> updateSuperviseInspectionById(@Header("Authorization") String token, @Body RequestBody requestBody);
    //科长即部门负责人审核,userName
    @GET("uc/personInfo/getTaskApproveLeve1")
    Call<JsonForResult> getTaskApproveLeve1(@Header("Authorization") String token, @QueryMap Map<String, String> params);
    //分管领导审核
    @GET("uc/personInfo/getTaskApproveLeve2")
    Call<JsonForResult> getTaskApproveLeve2(@Header("Authorization") String token, @QueryMap Map<String, String> params);
    //分管领导审核
    @DELETE()
    Call<JsonForResult> deleteProcess(@Header("Authorization") String token,@Header("username") String username, @QueryMap Map<String, String> params);
}
